Adaptive angle sensor

ABSTRACT

A method comprising: obtaining at least three sampled values m, each of the sampled values m including a respective first component that is obtained based on a first signal and a respective second component that is obtained based on a second signal and solving a system of equations to yield at least one of (i) an offset adjustment vector k, (ii) a sensitivity mismatch coefficient γ, and (iii) a non-orthogonality coefficient s, the system of equations being arranged to model each of the sampled values m as a function of: a respective one of a plurality of number arrays, a magnetic field, and the at least one of (i) the offset adjustment vector k, (ii) the sensitivity mismatch coefficient γ, and (iii) the non-orthogonality coefficient s.

BACKGROUND

As is known, sensors are used to perform various functions in a varietyof applications. Some sensors include one or magnetic field sensingelements, such as a Hall effect element or a magnetoresistive element,to sense a magnetic field associated with proximity or motion of atarget object, such as a ferromagnetic object in the form of a gear orring magnet, or to sense a current, as examples. Sensor integratedcircuits are widely used in automobile control systems and othersafety-critical applications. There are a variety of specifications thatset forth requirements related to permissible sensor quality levels,failure rates, and overall functional safety.

SUMMARY

According to aspects of the disclosure, a method is provided,comprising: obtaining at least three sampled values m, each of thesampled values m including a respective first component that is obtainedbased on a first signal and a respective second component that isobtained based on a second signal, the first signal being generated byfirst magnetic field sensing element in response to a magnetic fieldthat is associated with a rotating target and the second signal beinggenerated by a second magnetic field sensing element in response to themagnetic field that is associated with the rotating target, each of theat least three sampled values being associated with a differentrespective angular position of the rotating target; generating aplurality of number arrays based on the at least three sampled values m,each of the number arrays corresponding to a different respectivesampled value m, each of the number arrays being based on a scaled ornon-scaled value of the first component of the array's correspondingsampled value m and a scaled or non-scaled value of the second componentof the array's corresponding sampled value m; solving a system ofequations to yield at least one of (i) an offset adjustment vector k,(ii) a sensitivity mismatch coefficient γ, and (iii) a non-orthogonalitycoefficient s, the system of equations being arranged to model each ofthe sampled values m as a function of: the respective one of theplurality of number arrays that is generated based on the sampled valuem, the magnetic field that is associated with the rotating target, andthe at least one of (i) the offset adjustment vector k, (ii) thesensitivity mismatch coefficient γ, and (iii) the non-orthogonalitycoefficient s; and storing the at least one of (i) the offset adjustmentvector k, (ii) the sensitivity mismatch coefficient γ, and (iii) thenon-orthogonality coefficient s in a memory for use in adjusting atleast one of the first signal and the second signal.

According to aspects of the disclosure, a sensor is provided,comprising: a first magnetic field sensing element, the first sensingelement being arranged to generate a first signal in response to amagnetic field that is associated with a rotating target; a secondmagnetic field sensing element, the second sensing element beingarranged to generate a second signal in response to the magnetic fieldthat is associated with the rotating target; a memory; and a processingcircuitry operatively coupled to the memory, the first magnetic fieldsensing element and the second magnetic field sensing element, theprocessing circuitry being configured to: obtain at least three sampledvalues m, each of the sampled values m including a respective firstcomponent that is obtained based on the first signal and a respectivesecond component that is obtained based on the second signal, each ofthe at least three sample values being associated with a differentangular position of the rotating target; generate a plurality of numberarrays based on the at least three sampled values m, each of the numberarrays corresponding to a different respective sampled value m, each ofthe number arrays being based on a scaled or non-scaled value of thefirst component of the array's corresponding sampled value m and ascaled or non-scaled value of the second component of the array'scorresponding sampled value m; and solve a system of equations to yieldan offset adjustment vector k, the system of equations being arranged tomodel each of the sampled values m as a function of: the respective oneof the plurality of number arrays that is generated based on the sampledvalue m, the magnetic field that is associated with the rotating target,and the offset adjustment vector k; and store the offset adjustmentvector k in the memory for use in adjusting at least one of the firstsignal and the second signal.

According to aspects of the disclosure, a system is provided,comprising: a processing circuitry configured to: obtain at least threesampled values m, each of the sampled values m including a respectivefirst component that is obtained based on a first signal and arespective second component that is obtained based on a second signal,the first signal being generated by first magnetic field sensing elementin response to a magnetic field that is associated with a rotatingtarget and the second signal being generated by a second magnetic fieldsensing element in response to the magnetic field that is associatedwith the rotating target, each of the at least three sampled valuesbeing associated with a different respective angular position of therotating target;

generate a plurality of number arrays based on the at least threesampled values m, each of the number arrays corresponding to a differentrespective sampled value m, each of the number arrays being based on ascaled or non-scaled value of the first component of the array'scorresponding sampled value m and a scaled or non-scaled value of thesecond component of the array's corresponding sampled value m; solve asystem of equations to yield at least one of (i) an offset adjustmentvector k, (ii) a sensitivity mismatch coefficient γ, and (iii) anon-orthogonality coefficient s, the system of equations being arrangedto model each of the sampled values m as a function of: the respectiveone of the plurality of number arrays that is generated based on thesampled value m, the magnetic field that is associated with the rotatingtarget, and the at least one of (i) the offset adjustment vector k, (ii)the sensitivity mismatch coefficient γ, and (iii) the non-orthogonalitycoefficient s; and store the at least one of (i) the offset adjustmentvector k, (ii) the sensitivity mismatch coefficient γ, and (iii) thenon-orthogonality coefficient s in a memory for use in adjusting atleast one of the first signal and the second signal.

According to aspects of the disclosure, a system is provided comprising:means for obtaining at least three sampled values m, each of the sampledvalues m including a respective first component that is obtained basedon a first signal and a respective second component that is obtainedbased on a second signal, the first signal being generated by firstmagnetic field sensing element in response to a magnetic field that isassociated with a rotating target and the second signal being generatedby a second magnetic field sensing element in response to the magneticfield that is associated with the rotating target, each of the at leastthree sampled values being associated with a different respectiveangular position of the rotating target; means for generating aplurality of number arrays based on the at least three sampled values m,each of the number arrays corresponding to a different respectivesampled value m, each of the number arrays being based on a scaled ornon-scaled value of the first component of the array's correspondingsampled value m and a scaled or non-scaled value of the second componentof the array's corresponding sampled value m; means for solving a systemof equations to yield at least one of (i) an offset adjustment vector k,(ii) a sensitivity mismatch coefficient γ, and (iii) a non-orthogonalitycoefficient s, the system of equations being arranged to model each ofthe sampled values m as a function of: the respective one of theplurality of number arrays that is generated based on the sampled valuem, the magnetic field that is associated with the rotating target, andthe at least one of (i) the offset adjustment vector k, (ii) thesensitivity mismatch coefficient γ, and (iii) the non-orthogonalitycoefficient s; and means for storing the at least one of (i) the offsetadjustment vector k, (ii) the sensitivity mismatch coefficient γ, and(iii) the non-orthogonality coefficient s in a memory for use inadjusting at least one of the first signal and the second signal.

According to aspects of the disclosure, a non-transitory computerreadable medium storing one or more processor-executable instructions isprovided, which, when executed by a processing circuitry, cause theprocessing circuitry to perform the operations of: obtaining at leastthree sampled values m, each of the sampled values m including arespective first component that is obtained based on a first signal anda respective second component that is obtained based on a second signal,the first signal being generated by first magnetic field sensing elementin response to a magnetic field that is associated with a rotatingtarget and the second signal being generated by a second magnetic fieldsensing element in response to the magnetic field that is associatedwith the rotating target, each of the at least three sampled valuesbeing associated with a different respective angular position of therotating target; generating a plurality of number arrays based on the atleast three sampled values m, each of the number arrays corresponding toa different respective sampled value m, each of the number arrays beingbased on a scaled or non-scaled value of the first component of thearray's corresponding sampled value m and a scaled or non-scaled valueof the second component of the array's corresponding sampled value m;solving a system of equations to yield at least one of (i) an offsetadjustment vector k, (ii) a sensitivity mismatch coefficient γ, and(iii) a non-orthogonality coefficient s, the system of equations beingarranged to model each of the sampled values m as a function of: therespective one of the plurality of number arrays that is generated basedon the sampled value m, the magnetic field that is associated with therotating target, and the at least one of (i) the offset adjustmentvector k, (ii) the sensitivity mismatch coefficient γ, (and (iii) thenon-orthogonality coefficient s; and storing the at least one of (i) theoffset adjustment vector k, (ii) the sensitivity mismatch coefficient γ,and (iii) the non-orthogonality coefficient s in a memory for use inadjusting at least one of the first signal and the second signal.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing features may be more fully understood from the followingdescription of the drawings in which:

FIG. 1A is a side view of an example of a system, according to aspectsof the disclosure;

FIG. 1B is a bottom-up view of the system of FIG. 1A, according toaspects of the disclosure;

FIG. 2 is a diagram of an angle sensor, according to aspects of thedisclosure;

FIG. 3A is a plot of a sampled value distribution, according to aspectsof the disclosure;

FIG. 3B is a plot of a sampled value distribution, according to aspectsof the disclosure;

FIG. 3C is a plot of a sampled value distribution, according to aspectsof the disclosure;

FIG. 3D is a plot of a sampled value distribution, according to aspectsof the disclosure;

FIG. 3E is a plot illustrating a plurality of sampled values, accordingto aspects of the disclosure;

FIG. 3F is a diagram of a matrix that is generated based on the sampledvalues of FIG. 3E, according to aspects of the disclosure;

FIG. 4 is a diagram of illustrating the operation of a process foradjusting the output of magnetic field sensing elements, according toaspects of the disclosure;

FIG. 5 is a diagram of an example of a system, according to aspects ofthe disclosure;

FIG. 6 is a diagram of an example of a computing device, according toaspects of the disclosure;

FIG. 7A is a flowchart of an example of a process, according to aspectsof the disclosure; and

FIG. 7B is a flowchart of an example of a process, according to aspectsof the disclosure.

DETAILED DESCRIPTION

FIG. 1A-B illustrate an example of a system 100, according to aspects ofthe disclosure. The system 100 may include a rotating target 120 and asensor 110. The target 120 may be configured to rotate about an axisR-R. The sensor 110 may be disposed adjacent to the target 120 anddetect one or more of speed of rotation, angular position, direction,and/or any other characteristic of the movement of the target. Accordingto the example of FIGS. 1A-B, the target 120 is a permanent magnet.However, alternative implementations are possible in which the rotatingtarget 120 includes an electromagnet, a gear, a ferromagnetic objectwhich is used with a back biased magnet, a shaft, a wheel, and/or anyother suitable type of element.

FIG. 2 shows an example of the sensor 110, according to one example. Asillustrated, the sensor 110 may include first channel 201A and a secondchannel 201B. The first channel 201A may include a magnetic fieldsensing element 202A, an amplifier 204A, a conditioning circuitry 206A,an analog-to-digital converter (ADC) 208A. The second channel 201B mayinclude a magnetic field sensing element 202B, an amplifier 204B, aconditioning circuitry 206B, an analog-to-digital converter (ADC) 208B,a processing circuitry 212, and a memory 210.

The magnetic field sensing element 202A, according to the presentexample, may include one or more giant magnetoresistive (GMR) elements.However, alternative implementations are possible in which the magneticfield sensing element 202A includes another type of magnetic fieldsensing element, such as a Hall element or a tunnel magnetoresistive(TMR) element. In this regard, it will be understood that the presentdisclosure is not limited to any specific implementation of the magneticfield sensing element 202A. The conditioning circuitry 206A may includeone or more filters for filtering a signal 205A that is output by theamplifier 204A. By way of example, the conditioning circuitry 206A mayinclude a low-pass filter, a moving average filter (e.g., a sinc filter,etc.), and/or any other suitable type of filter. Stated succinctly, thepresent disclosure is not limited to any specific implementation of theconditioning circuitry 206A.

The magnetic field sensing element 202B, according to the presentexample, may include one or more giant magnetoresistive (GMR) elements.However, alternative implementations are possible in which the magneticfield sensing element 202B includes another type of magnetic fieldsensing element, such as a Hall element or a tunnel magnetoresistive(TMR) element. In this regard, it will be understood that the presentdisclosure is not limited to any specific implementation of the magneticfield sensing element 202B. The conditioning circuitry 206B may includeone or more filters for filtering a signal 205B that is output by theamplifier 204B. By way of example, the conditioning circuitry 206B mayinclude a low-pass filter, a moving average filter (e.g., a sinc filter,etc.), and/or any other suitable type of filter. Stated succinctly, thepresent disclosure is not limited to any specific implementation of theconditioning circuitry 206B.

The memory 210 may include any suitable type of volatile or non-volatilememory. According to the present example, the memory 210 includes anon-volatile memory, such as an Electrically Erasable ProgrammableRead-Only Memory (EEPROM). However, it will be understood that thepresent disclosure is not limited to any specific implementation of thememory 210.

The processing circuitry 212 may include one or more of analogcircuitry, digital circuitry, digital logic, a general-purposeprocessor, a special-purpose processor, an application-specificprocessor, a digital circuit processor, a field-programmable gate array(FPGA), and/or any other suitable type of electronic circuit. Althoughthe processing circuitry 212 is depicted as a monolithic block, it willbe understood that in some implementations, the processing circuitry 212may include a plurality of digital circuits.

In operation, the magnetic field sensing element 202A may generate asignal 203A in response to a magnetic field that is associated with therotating target 120 (e.g., a magnetic field that is at least in partgenerated by the rotating target 120, etc.). The amplifier 204A mayamplify the signal 203A to generate a signal 205A. The conditioningcircuitry 206A may filter the signal 205A to generate a signal 207A. TheADC 208A may digitize the signal 207A to produce a signal 209A. Althoughthe signals 203A, 205A, 207A, and 209A are referred to as differentsignals, it will be understood that each of the signals 205A, 207A, and209A may be considered to be a different instance of the signal 203A. Inthis regard, the phrases “output of sensing element 202A” or “signalgenerated by sensing element 202A” may refer to any of the signals 203A,205A, 207A, and 209B.

In operation, the magnetic field sensing element 202B may generate asignal 203B in response to a magnetic field that is associated with therotating target 120 (e.g., a magnetic field that is at least in partgenerated by the rotating target 120, etc.) The amplifier 204B mayamplify the signal 203B to generate a signal 205B. The conditioningcircuitry 206B may filter the signal 205B to generate a signal 207B. TheADC 208B may digitize the signal 207B to produce a signal 209B. Althoughthe signals 203B, 205B, 207B, and 209B are referred to as differentsignals, it will be understood that each of the signals 205B, 207B, and209B may be considered to be a different instance of the signal 203B. Inthis regard, the phrases “output of sensing element 202B” or “signalgenerated by sensing element 202B” may refer to any of the signals 203B,205B, 207B, and 209B.

In some implementations, the magnetic field sensing element 202A mayhave a first axis of maximum sensitivity and the magnetic field sensingelement 202B may have a second axis of maximum sensitivity that isdifferent from the first axis. Ideally, the first axis and the secondaxis may be orthogonal to each other. As a result, the signals 209A and209B may be off-phase by ninety (90) degrees. The signals 209A and 209Bmay be used to determine the angular position of the rotating target 120(e.g., by calculating the arctangent of the quotient of signals 209A-B,etc.).

A value of the signal 209A and a value of the signal 209B that aresampled at the same time (or within a predetermined sampling period) maybe referred to as a “sampled value”. A sampled value of signals 203A-Bincludes the values of signals 203A-B in the same time instant (orsubstantially the same time instant). The sampled value of signals203A-B is essentially a vector whose direction matches the angularposition of the target 120.

The processing circuitry 212 may be configured to evaluate a model 214for calculating one or more adjustment coefficients 211 and store theadjustment coefficients in the memory 210. Furthermore, the processingcircuitry 212 may be configured to adjust the output of at least one ofthe sensing elements 202A-B based on any of the adjustment coefficients211. The adjustment coefficients 211 may include one or more of: (i) anoffset adjustment vector that is used by the processing circuitry 212 toadjust the offset of one or more of signals 203A-B, (ii) a sensitivitymismatch coefficient that is used by the processing circuitry 212 toadjust the gain of one or more of the signals 203A-B, and (iii) anon-orthogonality coefficient that is used by the processing circuitryto adjust the gain of one or more of the signals 203A-B. The model 214may be the same or similar to one of Models 1-3, which are discussedfurther below. In some implementations, the model 214 may be based onone of equations 19, 37, and 60, which are discussed further below.Although in the example of FIG. 2 , the adjustment of signals 203A-B isperformed in the digital domain, alternative implementations arepossible where the adjustment is performed in the analog domain.

FIG. 3A illustrates a plot of a distribution 302 of the sample values ofsignals 203A-B. FIG. 3A shows the shape of the distribution 302 underideal circumstances, in which no offset or gain is imparted on signals203A-B (by a stray magnetic field) and no other distortions are presentin the signals 203A-B, such as distortions that are the result ofsensitivity mismatch or non-orthogonality. As noted above “a sampledvalue of signals 203A-B” may include the values of signals 203A-B in aparticular moment of the rotation of target 120. FIG. 3A illustratesthat, under ideal circumstances, the distribution of the sample valuesof signals 203A-B may be shaped as a circle that is centered on theorigin of a coordinate system. The radius of the circle may be equal tothe strength of the magnetic field associated with the target 120. Eachsampled value of the signals 203A-B may be regarded as a vector thatstarts at the origin of the circle and ends on the circumference of thecircle, and whose direction matches the angular position of the target120.

FIG. 3B illustrates a plot of the distribution 302 in the presence of astray magnetic field that is incident on the sensor 110. FIG. 3Billustrates that the stray magnetic field may cause the distribution 302to be offset from the origin of the coordinate system by a distance D,which is equal to the magnitude of the stray magnetic field. In someimplementations, the model 214 calculates the distance D that is presentin the signals 203A-B based on sampled values of signals 203A-B. Thecalculated value for distance D is subsequently used as an offsetadjustment vector to adjust (or trim) the signals 203A-B and correct forthe effects of the stray magnetic field.

FIG. 3C illustrates a plot of the distribution 302 in the presence of:(i) of a sensitivity mismatch between channels 201A-B, and (ii) a straymagnetic field that is incident on the sensor 110. A sensitivitymismatch between the channels 201A and 201B may include a sensitivitymismatch between the sensing elements 202A and 202B, a sensitivitymismatch between the amplifiers 204A and 204B, etc. FIG. 3C illustratesthat the distribution 302 may become flattened as a result of thesensitivity mismatch between channels 201A-B. In some implementations,the model 214 calculates the degree to which the distribution 302 isflattened based on sampled values of signals 203A-B. The calculateddegree is subsequently used to derive a sensitivity mismatch coefficientfor adjusting (or trimming) the signals 203A-B in order to correct forthe sensitivity mismatch. Calculating the degree to which thedistribution 302 is flattened may include calculating the smaller radiusof the plot.

FIG. 3D illustrates a plot of the distribution 302 in the presence of:(i) orthogonality mismatch between sensing elements 202A-B (ii)sensitivity mismatch between channels 201A-B, and (iii) a stray magneticfield that is incident on the sensor 110. FIG. 3D illustrates that anorthogonality mismatch between the sensing elements 202A and 202B maycause the distribution 302 to become skewed. In some implementations,the model 214 calculates the degree to which the distribution 302 isskewed based on sampled values of signals 203A-B. The calculated degreeis subsequently used to derive a non-orthogonality coefficient to adjust(or trim) the signals 203A-B and correct for the effects of theorthogonality mismatch. Calculating the degree to which the distribution302 is skewed may include calculating the orthogonality mismatch betweenthe sensing elements 202A-B. The sample values of signals 203A-B may beadjusted to correct for the orthogonality mismatch by using anorthogonality mismatch coefficient s. The orthogonality mismatchcoefficients is the sinusoid of the excess, from 90 degrees, of theangle between the axis of maximum sensitivity of the sensing element202A and the axis of maximum sensitivity of the sensing element 202B.The orthogonality mismatch coefficient s is discussed further below.

FIG. 3E illustrates sampled values m₁, m₂, and m₃ of signals 203A-B.Sampled value m₁ may be taken when the target 120 is at a first angularposition, the sampled value m₂ may be taken when the target 120 is at asecond angular position, and the sampled value m₃ may be taken when thetarget 120 is at a third angular position. Ideally the first, second,and third angular positions may be offset from each other by 120degrees, however the present disclosure is not limited to any specificoffset between the first, second, and third angular positions. Althoughin the present example the sampled values m1, m2, and m3 are taken atangular positions of the target 120, which are 120 degrees apart, thepresent disclosure is not limited thereto. In some implementations, theminimum angular distance between the positions at which the samplesvalues m1, m2, and m3 are taken may depend on the standard deviation ofangle noise.

Sampled value m₁ may include elements m_(x_1) and m_(y_1). Elementm_(x_1) may be a single sample of the signal 203A or the average of aplurality of samples of the signal 203A that are taken at a very fastrate, while the target 120 is at substantially the same angularposition. Element m_(y_1) may be a single sample of the signal 203B orthe average of a plurality of samples of the signal 203B that are takenat a very fast rate, while the target 120 is at substantially the sameangular position.

Sampled value m₂ may include elements m_(x_2) and m_(y_2). Elementm_(x_2) may be a single sample of the signal 203A or the average of aplurality of samples of the signal 203A that are taken at a very fastrate, while the target 120 is at substantially the same angularposition. Element m_(y_2) may be a single sample of the signal 203B orthe average of a plurality of samples of the signal 203B that are takenat a very fast rate, while the target 220 is at substantially the sameangular position.

Sampled value m₃ may include elements m_(x_3) and m_(y_3). Elementm_(x_3) may be a single sample of the signal 203A or the average of aplurality of samples of the signal 203A that are taken at a very fastrate, while the target 120 is at substantially the same angularposition. Element m_(y_3) may be a single sample of the signal 203B orthe average of a plurality of samples of the signal 203B that are takenat a very fast rate, while the target 120 is at substantially the sameangular position.

In some respects, setting the values of the elements of sampled valuesm₁₋₃ to equal the average of a plurality of signal samples isadvantageous because it may filter out noise or other transient errorsthat are present in the signals 203A-B.

FIG. 3F shows an example of a matrix M, which the model 214 can beevaluated against. The matrix M may include number arrays 330A-C. Numberarray 330A is generated based on sample value m₁. The first element ofnumber array 330A is the magnitude of the magnetic field associated withthe target 120 (or the radius of the distribution 302). The remainingtwo elements of number array 330B-C are components m_(x_1) and m_(y 1)of sampled value m₁. Number array 330B is generated based on samplevalue m₂. The first element of number array 330B is the magnitude of themagnetic field associated with the target 120 (or the radius of thedistribution 302). The remaining two elements of number array 330B arecomponents m_(x_2) and m_(y_2) of sampled value m₂. Number array 330C isgenerated based on sample value m₃. The first element of number array330C is the magnitude of the magnetic field associated with the target120 (or the radius of the distribution 302). The remaining two elementsof number array 330C are components m_(x_3) and m_(y_3) of sampled valuem₃. In some implementations, each of the number arrays 330 in the matrixM may include additional elements. As illustrated in equations 37 and60, each of the additional elements, in any given one of the numberarrays in the matrix M, may be based on one or more of the componentsm_(i_x) and m_(i_y), of the given sampled value m.

FIG. 4 is a diagram illustrating a process for adjusting signals 203A-Bto correct for the offsets and distortions that are discussed withrespect to FIGS. 3A-D. FIG. 4 illustrates that adjusting the signals203A-B may have the effect of restoring the distribution 302 to itsideal shape and position. As noted above, the adjustment may beperformed by using the model 214. The model 214 relies on theobservation that the distribution of the sample values of signals 203A-Bhas a circular (or oval shape), with a radius that is known ahead oftime. When solved, the model may yield one or more adjustmentcoefficients, which ideally can be used to effect a transformation ofthe actual distribution of the sampled values of signals 203A-B (alsoshown in FIGS. 3B-D) to the ideal distribution (also shown in FIG. 3A).

In the example of FIG. 2B, the model 214 is evaluated by the processingcircuitry of the sensor 110. However, alternative implementations arepossible in which the model is evaluated by a calibration system 502(shown in FIG. 5 ). Furthermore, alternative implementations arepossible in which the model 214 is evaluated by any computing device,such as the computing device 600, which is shown in FIG. 6 .

FIG. 5 shows is a diagram of a system 500, according to aspects of thedisclosure. As illustrated, the system 500 may include the sensor 110,the rotating target 120, and a calibration system 502. In operation, thecalibration system 502 may receive the signals 209A and 20B from thesensor 110. Next, the calibration system 502 may calculate the one ormore adjustment coefficients 211 based on the signals 209A-B and themodel 214. And finally, the calibration system 502 may provide the oneor more adjustment coefficients 211 to the sensor 110 for storage in thememory 210.

FIG. 6 is a diagram of an example of a computing device 600, accordingto aspects of the disclosure. As illustrated, the computing device 600may include a processing circuitry 602, a memory 604, and acommunications interface 606. The processing circuitry 602 may includeone or more of a general-purpose processor, a special-purpose processor,an application-specific integrated circuit (ASIC), a field-programmablegate array (FPGA), and/or any other suitable type of processingcircuitry. The memory 604 may include any suitable type of volatile ornon-volatile memory. The memory 604 may include one or more of arandom-access memory, flash memory, Electrically Erasable ProgrammableRead-Only Memory (EEPROM), a solid-state drive (SSD), a hard-disk,and/or any other suitable type of memory. The communications interfacemay include any suitable type of communications interface, such as oneor more of an inter-integrated circuit (I2C) interface, a UniversalSerial Bus interface, a controller area network (CAN bus) interface, anEthernet interface, and/or any other interface for receiving a signalthat is output by the sensor 110.

FIG. 7A is a flowchart of an example of a process 700A, according toaspects of the disclosure. According to the present example, the process700A is executed by the processing circuitry 212 of the sensor 110(shown in FIG. 2 ). However, alternative implementations are possible inwhich the process 700A is executed by the calibration system 502 (shownin FIG. 5 ) and/or the computing device 600 (shown in FIG. 6 ). At step702, the signal 209A and the signal 209B are received. At step 704 atleast three sampled values m are obtained based on the first signal 209Aand 209B. The sampled values may be the same or similar to the sampledvalues m₁, m₂, and m₃, which are discussed above with respect to FIG.3E. As discussed further below, depending on the exact implementation ofthe model, more than three sampled values may be obtained in someinstances. At step 706, a plurality of number arrays is generated basedon the plurality of sampled values. The plurality of number arrays maybe the same or similar to then number arrays 330A-C, which are discussedabove with respect to FIG. 3F. In some implementations, a differentsample array may be generated for each of the sampled values obtained atstep 704, and each of the sampled arrays may be generated based on adifferent one of the sampled values. At step 708, the processingcircuitry 212 generates one or more adjustment coefficients 211 byevaluating the model 214. The one or more adjustment coefficients mayinclude at least one of: (i) an offset adjustment vector k, (ii) asensitivity mismatch coefficient γ, and (iii) a non-orthogonalitycoefficient s. Examples of different methods for generating the one ormore adjustment coefficients are discussed further below with respect toModels. In some implementations, one or more of (i) the offsetadjustment vector k, (ii) the sensitivity mismatch coefficient γ, and(iii) the non-orthogonality coefficient s may be calculated by solvingone of equations 19, 37, and 60 based on the sampled values obtained atstep 704. Equations 19, 37, and 60 are discussed further below.

At step 710, the processing circuitry 212 stores the one or morecoefficients 211 in the memory 210. According to the example of FIG. 7A,the coefficients are stored in the memory of the sensor 110, however ininstances in which the process 700A is executed by another device (suchas the calibration system 502 or the device 600), the one or morecoefficients 211 may be stored in the memory of another device. In someimplementations, the processing circuitry 212 may adjust the signals209A and 209B based on the coefficients.

FIG. 7B is a flowchart of an example of a process 700B, according toaspects of the disclosure. According to the present example, the process700B is performed by processing circuitry 212. However, alternativeimplementations are possible in which the process 700B is performed byan external computing device. At step 712, the processing circuitry 212receives the signals 209A and 209B. At step 714, the processingcircuitry retrieves the one or more coefficients 211 from the memory210. At step 716 at least one of the signals 209A and 209B is adjustedbased on the one or more coefficients. Depending on the implementationof the model 214, the adjustment may be performed based on therelationships presented in equations 1-66 below. At step 718, theadjusted signals 209A and 209B are output as signals 213A and 213B,respectively.

The discussion that follows provides examples of Models 1-3, which canbe used to calculate different adjustment coefficients for trimming theoutput of the sensing elements 202A-B. Models 1-3 can be regarded asdifferent sub-species of the same general. As noted above, model 214 maybe the same or similar to any of Models 1-3.

MODEL 1

Model 1 is a mathematical model that can be used to calculate an offsetadjustment vector k. Model 1 presumes that there is no gain mismatchbetween the sensing elements 202A-B. Furthermore, Model 1 models noisethat The offset adjustment vector k includes elements k_(x) and k_(y).Element k_(x) is based on element o_(x) of an offset adjustment vectoro, which can be used to adjust the offset of signal 203A. Element k_(y)is based on element o_(y) of an offset adjustment vector o, which can beused to adjust the offset of signal 203B. The offset adjustment vector ois related to the offset adjustment vector k by equation 4 below. Asused throughout the disclosure, the term offset adjustment vector mayrefer to either one of offset adjustment vector o or the offsetadjustment vector k.

Model 1 is presented in the context of a target magnetic field at sampletime i: b_(i)=[b_(x) _(i) b_(y) _(i) ]^(T). The magnitude of themagnetic field b is b²=||b_(i)||². The target magnetic field b_(i) isthe true value of the magnetic field that is generated by the target120. The target magnetic field b_(i) is constant over time (e.g., whenthe target 120 is a permanent magnet, etc.). The output of the sensingelements 202A-B at time i is, m_(i)=[m_(x) _(i) m_(y) _(i) ]^(T), wherem_(i). Is the same or similar to any of the sampled values m discussedabove with respect to FIG. 3F. Each value m_(i) is also referred to assensed magnetic field m_(i). As is discussed further below, solvingModel 1 based on sampled values m of the signals 203A-B may yield theoffset adjustment vector. These coefficients can be used to derive thevalue of the target magnetic field b from the measured magnetic fieldm_(i), based on the relationships that are described below by equations21-24.

Model 1 is based on the following terms:

-   -   Stray field: ƒ=[ƒ_(x)ƒ_(y)]^(T). Considered to be constant over        time); This term models a stray field that is incident on the        sensing elements 202A-B.    -   Sensitivity matrix:

$S = {S_{o}\begin{bmatrix}1 & 0 \\0 & 1\end{bmatrix}}$(considered to be constant over time);

-   -   Electrical gain matrix:

$G = {G_{o}\begin{bmatrix}1 & 0 \\0 & 1\end{bmatrix}}$(considered to be constant over time);

-   -   Noise vector at sample time i: n_(i)=[n_(x) _(i) n_(y) _(i)        ]^(T) (considered to be zero mean, not necessarily white,        independence between components

μ_(n_(x_(i))) = μ_(n_(y_(i))) = μ_(n) = 0,E[n_(x) _(i) n_(y) _(j) ]=0∀i, j, both channels having same power σ_(n)_(x) ²=σ_(n) _(y) ²=σ_(n) ², and also uncorrelated with the input signaland the offset, i.e. E[(b_(i)+ƒ+o)n_(i) ^(T)]=0).

-   -   sensitivity and gain product: A₀—In some implementations, the        value of A₀ may be set to equal the actual gain of the analog        front-end amplifier(s) 205A-B.

A detailed derivation of Model 1 is provided as follows. The sensedfield m may be modeled by Equation 1 below:m _(i)=G(S(b _(i)+ƒ)+o)+n _(i)   (1)

Let:m _(i)=Ab _(i)+k+n _(i)  (2)where

${A = {{GS} = {A_{0}\begin{bmatrix}1 & 0 \\0 & 1\end{bmatrix}}}},$and it is constant over time   (3)

${k = {{{GSf} + {Go}} = \begin{bmatrix}k_{x} \\k_{y}\end{bmatrix}}},$and it is constant over time   (4)A ₀=G ₀S₀, and it is constant over time   (5)

$\begin{matrix}{A^{- 1} = {\left( A^{- 1} \right)^{T} = {\frac{1}{A_{0}}\begin{bmatrix}1 & 0 \\0 & 1\end{bmatrix}}}} & (6)\end{matrix}$ $\begin{matrix}{{\left( A^{- 1} \right)^{T}A^{- 1}} = {\frac{1}{A_{0}^{2}}\begin{bmatrix}1 & 0 \\0 & 1\end{bmatrix}}} & (7)\end{matrix}$ $\begin{matrix}{{E\left\lbrack {m_{i}n_{i}^{T}} \right\rbrack} = {{E\left\lbrack {\begin{bmatrix}m_{x_{i}} \\m_{y_{i}}\end{bmatrix}\begin{matrix}\left\lbrack n_{x_{i}} \right. & \left. n_{y_{i}} \right\rbrack\end{matrix}} \right\rbrack} = {\begin{bmatrix}\sigma_{n_{x}}^{2} & 0 \\0 & \sigma_{n_{y}}^{2}\end{bmatrix} = {\sigma_{n}^{2}\begin{bmatrix}1 & 0 \\0 & 1\end{bmatrix}}}}} & (8)\end{matrix}$

The target magnetic field sample b_(i) may be modeled by equation 9below:b _(i)=A ⁻¹(m _(i) −k−n _(i))   (9)

Equation 10 below can be derived from equation 9 as follows:

$\begin{matrix}\begin{matrix}{{b_{i}}^{2} = {b_{i}^{T}b_{i}}} \\{= {\left( {m_{i} - k - n_{i}} \right)^{T}\left( A^{- 1} \right)^{T}{A^{- 1}\left( {m_{i} - k - n_{i}} \right)}}} \\{= {\left\lbrack {m_{x_{i}} - k_{x} - {n_{x_{i}}\ m_{y_{i}}} - k_{y} - n_{y_{i}}} \right\rbrack{{\frac{1}{A_{0}^{2}}\begin{bmatrix}1 & 0 \\0 & 1\end{bmatrix}}\begin{bmatrix}m_{x_{i}} & - & {k_{x} - n_{x_{i}}} \\m_{y_{i}} & - & {k_{y} - n_{y_{i}}}\end{bmatrix}}}} \\{= {\frac{1}{A_{0}^{2}}\begin{bmatrix}{m_{x_{i}}^{2} + k_{x}^{2} - {2m_{x_{i}}k_{x}} - {2m_{x_{i}}n_{x_{i}}} + {2k_{x}n_{x_{i}}} + n_{x_{i}}^{2}} \\ + \\{m_{y_{i}}^{2} + k_{y}^{2} - {2m_{y_{i}}k_{y}} - {2m_{y_{i}}n_{y_{i}}} + {2k_{y}n_{y_{i}}} + n_{y_{i}^{2}}}\end{bmatrix}}}\end{matrix} & (10)\end{matrix}$

Taking the statistical expectation at both sides of equation 10 yieldsequations 11-12 below:

$\begin{matrix}{{E\left\lbrack {b_{i}}^{2} \right\rbrack} = {{b_{i}}^{2} = {\frac{1}{A_{0}^{2}}\left( {{E\left\lbrack {m_{i}}^{2} \right\rbrack} + k_{x}^{2} + k_{y}^{2} - {2{E\left\lbrack m_{x_{i}} \right\rbrack}k_{x}} - {2{E\left\lbrack m_{y_{i}} \right\rbrack}k_{y}} - {2\sigma_{n}^{2}}} \right)}}} & (11)\end{matrix}$ $\begin{matrix}\begin{matrix}{{E\left\lbrack {m_{i}}^{2} \right\rbrack}\  = {{A_{0}^{2}{b_{i}}^{2}} + {2\sigma_{n}^{2}} - {k}^{2} + {2{E\left\lbrack m_{x_{i}} \right\rbrack}k_{x}} + {2{E\left\lbrack m_{y_{i}} \right\rbrack}k_{y}}}} \\{= {\begin{matrix}\left\lbrack {\begin{matrix}1 & {2E}\end{matrix}\left\lbrack m_{x_{i}} \right\rbrack}\  \right. & \left. {2{E\left\lbrack m_{y_{i}} \right\rbrack}} \right\rbrack\end{matrix}\begin{bmatrix}{{A_{0}^{2}{b_{i}}^{2}} - {k}^{2} + {2\sigma_{n}^{2}}} \\k_{x} \\k_{y}\end{bmatrix}}}\end{matrix} & (12)\end{matrix}$

Equation 12 below can be derived from equation 11, as follows:

$\begin{matrix}{\begin{bmatrix}{E\left\lbrack {m_{1}}^{2} \right\rbrack} \\{E\left\lbrack {m_{2}}^{2} \right\rbrack} \\{E\left\lbrack {m_{3}}^{2} \right\rbrack}\end{bmatrix} = {\begin{bmatrix}1 & {2{E\left\lbrack m_{x_{1}} \right\rbrack}} & {2{E\left\lbrack m_{y_{1}} \right\rbrack}} \\1 & {2{E\left\lbrack m_{x_{2}} \right\rbrack}} & {2{E\left\lbrack m_{y_{2}} \right\rbrack}} \\1 & {2{E\left\lbrack m_{x_{3}} \right\rbrack}} & {2{E\left\lbrack m_{y_{3}} \right\rbrack}}\end{bmatrix}\begin{bmatrix}{{A_{0}^{2}{b_{i}}^{2}} - {k}^{2} + {2\sigma_{n}^{2}}} \\k_{x} \\k_{y}\end{bmatrix}}} & (13)\end{matrix}$Where m₁, m₂, and m₃ are the sampled values discussed above with respectto FIG. 3E.

In some respects, if b_(i)≠b_(j) then E[m_(i)]≠E[m_(j)]∀i, j=1,2,3, i∀j,the equation can be perfectly solved. In practice, the expected valuesare unknown since all sample values m₁ are corrupted by noise. In someimplementations, statistical expectation can be replaced by time averagebut that should imply to sample several times the same target positionin order to average them, filtering out noise.

Considering the above observation, target magnetic field sample b_(i)may be also modeled by equation 14 below:

$\begin{matrix}\begin{matrix}{{b_{i}}^{2} = {\frac{1}{A_{0}^{2}}\begin{bmatrix}{m_{x_{i}}^{2} + k_{x}^{2} - {2m_{x_{i}}k_{x}} - {2m_{x_{i}}n_{x_{i}}} + {2k_{x}n_{x_{i}}} + n_{x_{i}}^{2}} \\ + \\{m_{y_{i}}^{2} + k_{y}^{2} - {2m_{y_{i}}k_{y}} - {2m_{y_{i}}n_{y_{i}}} + {2k_{y}n_{y_{i}}} + n_{y_{i}}^{2}}\end{bmatrix}}} \\{= {\frac{1}{A_{0}^{2}}\left\lbrack {{m_{i}}^{2} + {k}^{2} - {2m_{x_{i}}k_{x}} - {2m_{y_{i}}k_{y}} + n_{i}^{\prime}} \right\rbrack}}\end{matrix} & (14)\end{matrix}$where

$\begin{matrix}{{n_{i}^{\prime} = {n_{x_{i}}^{2} + n_{y_{i}^{2}} + {2k_{x}n_{x_{i}}} + {2k_{y}n_{y_{i}}} - {2m_{x_{i}}n_{x_{i}}} - {2m_{y_{i}}n_{y_{i}}}}}{= {{- \left( {n_{x_{i}}^{2} + n_{y_{i}}^{2}} \right)} - {2{A_{0}\left( {{b_{x_{i}}n_{x_{i}}} + {b_{y_{i}}n_{y_{i}}}} \right)}}}}{= {{{- 2}\sigma_{n}^{2}} + {2\sigma_{n}^{2}} - \left( {n_{x_{i}}^{2} + n_{y_{i}}^{2}} \right) - {2{A_{0}\left( {{b_{x_{i}}n_{x_{i}}} + {b_{y_{i}}n_{y_{i}}}} \right)}}}}{= {{{- 2}\sigma_{n}^{2}} - \varepsilon_{i}}}} & (15)\end{matrix}$

A noise term ξ_(i)may be introduced to model the error that is presentin the output of the sensing elements 202A-B. The term ξ_(i) may bedefined by equation 16 below:ξ_(i)=−2σ_(n) ²+(n _(x) _(i) ²+n _(y) _(i) ²)+2A ₀(b _(x) _(i) n_(x)_(i) +b _(y) _(i) n_(y) _(i) ) and E[ξ]=0.  (16)

The value of each sample m may then be expressed in terms of ξ_(i), asfollows:

$\begin{matrix}\begin{matrix}{{m_{i}}^{2} = {{A_{0}^{2}{b_{i}}^{2}} - {k}^{2} + {2m_{x_{i}}k_{x}} + {2m_{y_{i}}k_{y}} - n_{i}^{\prime}}} \\{= {{\begin{matrix}\left\lbrack 1 \right. & {2m_{x_{i}}} & \left. {2m_{y_{i}}} \right\rbrack\end{matrix}\begin{bmatrix}{{A_{0}^{2}{b_{i}}^{2}} - {k}^{2} + {2\sigma_{n}^{2}}} \\k_{x} \\k_{y}\end{bmatrix}} + \varepsilon_{i}}}\end{matrix} & (17)\end{matrix}$

Using a least-squares fitting, equation 17 may be solved to yieldequation 18 below:

$\begin{matrix}{\begin{bmatrix}{m_{1}}^{2} \\{m_{2}}^{2} \\{m_{3}}^{2} \\ \vdots \\{m_{N}}^{2}\end{bmatrix} = {{\begin{bmatrix}1 & {2m_{x_{1}}} & {2m_{y_{1}}} \\1 & {2m_{x_{2}}} & {2m_{y_{2}}} \\1 & {2m_{x_{3}}} & {2m_{y_{3}}} \\ \vdots & \vdots & \vdots \\1 & {2m_{x_{N}}} & {2m_{y_{N}}}\end{bmatrix}\begin{bmatrix}{{A_{0}^{2}{b_{i}}^{2}} - {k}^{2} + {2\sigma_{n}^{2}}} \\k_{x} \\k_{y}\end{bmatrix}} + \begin{bmatrix}\varepsilon_{1} \\\varepsilon_{2} \\\varepsilon_{3} \\ \vdots \\\varepsilon_{N}\end{bmatrix}}} & (18)\end{matrix}$

Consider equation 18, and let:

${{m = \begin{bmatrix}{m_{1}}^{2} \\{m_{2}}^{2} \\{m_{3}}^{2} \\ \vdots \\{m_{N}}^{2}\end{bmatrix}};{M = \begin{bmatrix}1 & {2m_{x_{1}}} & {2m_{y_{1}}} \\1 & {2m_{x_{2}}} & {2m_{y_{2}}} \\1 & {2m_{x_{3}}} & {2m_{y_{3}}} \\ \vdots & \vdots & \vdots \\1 & {2m_{x_{N}}} & {2m_{y_{N}}}\end{bmatrix}};}{{v = \begin{bmatrix}{{A_{0}^{2}{b_{i}}^{2}} - {k}^{2} + {2\sigma_{n}^{2}}} \\k_{x} \\k_{y}\end{bmatrix}};{\varepsilon = \begin{bmatrix}\varepsilon_{1} \\\varepsilon_{2} \\\varepsilon_{3} \\ \vdots \\\varepsilon_{N}\end{bmatrix}}}$In some respects, equation 18 expresses the norm squared of the magneticfield b as a function of the sampled values m.

Then the optimal solution which minimizes ||ξ||² is:

$\begin{matrix}{\overset{\hat{}}{v} = {{\left( {M^{T}M} \right)^{- 1}M^{T}m} = \begin{bmatrix}{{A_{0}^{2}{b_{i}}^{2}} - {\hat{k}}^{2} + {2\sigma_{n}^{2}}} \\{\hat{k}}_{x} \\{\hat{k}}_{y}\end{bmatrix}}} & (19)\end{matrix}$

In some implementations, step 708 of the process 700A may be performedby solving equation 19 to obtain the values of the offset adjustmentvector k. As noted above, each of the sampled values m in equation 19 isthe same or similar to the sampled values m of signals 202A-B that arediscussed above with respect to FIG. 3E. Each of the sampled values mmay be obtained by sampling the signals 203A-B. The generalized inverse(M^(T)M)⁻¹M^(T) (also called the Moore-Penrose pseudo inverse) can befound by any numeric method (like Recursive Least-squares—RLS or anyother model with/without forgetting old sampled values in order to allowkeeping track of parameters variations over time due to for exampletemperature drift). According to the present disclosure, {circumflexover (v)} is the optimum solution of v. Furthermore, b²A₀ may be equalto the square norm of the magnetic field multiplied by the gain of theamplifier 204A-B. In some implementations, the technique described withrespect to Models 2 and 3, also. That is, any of Models 2 and 3 may bemodified to include a noise term ξ in the manner shown with respect toModel 1, and any of Models 2 and 3 may be solved to minimize the valueof ||ξ||².

Finally, the best least-squares estimation obtained with N samples is:A ₀ {circumflex over (b)} _(i)=m ₁−{circumflex over (k)}  (20)It should be noted that that this method is valid as long as b₁ ≠b_(j),i ≠j, which implies a moving target but not necessarily a full turn isrequired even knowing the real target angle.

MODEL 2

Model 2 is a more generalized version of Model 1. Model 2 can be used tocalculate an offset adjustment vector k, as well as a sensitivitymismatch coefficient γ. The sensitivity mismatch coefficient γ can beused to compensate for the sensitivity mismatch between the sensingelements 202A-B.

The offset adjustment vector k includes elements k_(x) and k_(y).Element k_(x) is based on element ox of an offset adjustment vector o,which can be used to adjust the offset of signal 203A. Element k_(y) isbased on element o_(y) of an offset adjustment vector o, which can beused to adjust the offset of signal 203B. The offset adjustment vector ois related to the offset adjustment vector k by equation 24 below. Asused throughout the disclosure, the term offset adjustment vector mayrefer to either one offset adjustment vector o or the offset adjustmentvector k.

Model 2 is presented in the context of a target magnetic field at sampletime i: b_(i)=[b_(x) _(i) b_(y) _(i) ]^(T). The magnitude of themagnetic field b is b²=||b_(i)||². The target magnetic field b_(i) isthe true value of the magnetic field that is generated by the target120. The target magnetic field b_(i) is constant over time (e.g., whenthe target 120 is a permanent magnet, etc.). The output of the sensingelements 202A-B at time i is, m_(i)=[m_(x) _(i) m_(y) _(i) ]^(T), wherem_(i). Is the same or similar to any of the sampled values m discussedabove with respect to FIG. 3F. Each value m_(i) is also referred to assensed magnetic field m_(i). As is discussed further below, solvingModel 2 based on a set of sampled values of signals 203A-B may yield theoffset adjustment vector, and the sensitivity mismatch coefficient.These coefficients can be used to derive (or better approximate) thevalue of the target magnetic field b_(i), from the measured magneticfield m_(i), in accordance with the relationships that are describedbelow by equations 21-24.

Model 2 is based on the following terms:

-   -   Stray field: ƒ=[ƒ_(x)ƒ_(y)]^(T) (considered to be constant over        time)    -   Offset: o=[o_(x)o_(y)]^(T) (considered to be constant over time)    -   Sensitivity matrix:

$S = {S_{o}\begin{bmatrix}{1 + \Delta_{s}} & 0 \\0 & {1 - \Delta_{s}}\end{bmatrix}}$(considered to be constant over time)

-   -   Electrical gain matrix:

$G = {G_{o}\begin{bmatrix}{1 + \Delta_{G}} & 0 \\0 & {1 - \Delta_{G}}\end{bmatrix}}$considered to be constant over time)

The sensed field m may be modeled by Equation 21 below:m _(i)=G(S(b _(i)+ƒ)+o)   (21)

Let:m_(i)=Ab _(i)+k   (22)where

${A = {{GS} = {A_{0}\begin{bmatrix}{1 + \Delta_{A}} & 0 \\0 & {1 - \Delta_{A}}\end{bmatrix}}}},$and is constant over time   (23)

${k = {{{GSf} + {Go}} = \begin{bmatrix}k_{x} \\k_{y}\end{bmatrix}}},$and is constant over time   (24)A ₀=G ₀ S ₀(1+Δ_(G)Δ_(S)) , and is constant over time   (25)

${\Delta_{A} = \frac{\Delta_{G} + \Delta_{s}}{1 + {\Delta_{G}\Delta_{s}}}},$and is constant over time   (26)

$\begin{matrix}{A^{- 1} = {\left( A^{- 1} \right)^{T} = {\frac{1}{A_{0}\left( {1 - \Delta_{A}^{2}} \right)}\begin{bmatrix}{1 - \Delta_{A}} & 0 \\0 & {1 + \Delta_{A}}\end{bmatrix}}}} & (27)\end{matrix}$ $\begin{matrix}{{\left( A^{- 1} \right)^{T}A^{- 1}} = {\frac{1}{{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}}\begin{bmatrix}\left( {1 -} \right. & \left. \Delta_{A} \right)^{2} & 0 \\0 & & \left( {1 + \Delta_{A}} \right)^{2}\end{bmatrix}}} & (28)\end{matrix}$ $\begin{matrix}{b_{i} = {A^{- 1}\left( {m_{i} - k} \right)}} & (29)\end{matrix}$ $\begin{matrix}{{b^{2} = {{b_{i}}^{2} = {{b_{i}^{T}b_{i}} = {\left( {m_{i} - k} \right)^{T}\left( A^{- 1} \right)^{T}{A^{- 1}\left( {m_{i} - k} \right)}}}}}{= {\left\lbrack {m_{x_{i}} - {k_{x}\ m_{y_{i}}} - k_{y}} \right\rbrack{{\frac{1}{{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}}\begin{bmatrix}\left( {1 - \Delta_{A}} \right)^{2} & 0 \\0 & \left( {1 + \Delta_{A}} \right)^{2}\end{bmatrix}}\begin{bmatrix}{m_{x_{i}} - k_{x}} \\{m_{y_{i}} - k_{y}}\end{bmatrix}}}}{= {\frac{1}{{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}}\left\lbrack {{\left( {m_{x_{i}} - k_{x}} \right)^{2}\left( {1 - \Delta_{A}} \right)^{2}} + {\left( {m_{y_{i}} - k_{y}} \right)^{2}\left( {1 + \Delta_{A}} \right)^{2}}} \right\rbrack}}{= \frac{1}{{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}}}\begin{bmatrix}{{m_{x_{i}}^{2}\left( {1 - \Delta_{A}} \right)}^{2} + {k_{x}^{2}\left( {1 - \Delta_{A}} \right)}^{2} - {2m_{x_{i}}{k_{x}\left( {1 - \Delta_{A}} \right)}^{2}} + {m_{y_{i}}^{2}\left( {1 + \Delta_{A}} \right)}^{2} +} \\{{k_{y}^{2}\left( {1 + \Delta_{A}} \right)}^{2} - {2m_{y_{i}}{k_{y}\left( {1 + \Delta_{A}} \right)}^{2}}}\end{bmatrix}} & (30)\end{matrix}$

From equations 23-30, it follows:

$\begin{matrix}{{b^{2}{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}} = \begin{bmatrix}{{m_{x_{i}}^{2}\left( {1 - \Delta_{A}} \right)}^{2} + {m_{y_{i}}^{2}\left( {1 + \Delta_{A}} \right)}^{2} + {k_{x}^{2}\left( {1 - \Delta_{A}} \right)}^{2} +} \\{{k_{y}^{2}\left( {1 + \Delta_{A}} \right)}^{2} - {2m_{x_{i}}{k_{x}\left( {1 - \Delta_{A}} \right)}^{2}} - {2m_{y_{i}}{k_{y}\left( {1 + \Delta_{A}} \right)}^{2}}}\end{bmatrix}} & (31)\end{matrix}$ $\begin{matrix}\begin{matrix}{{m_{x_{i}}^{2}\left( {1 - \Delta_{A}} \right)}^{2} =} \\\begin{bmatrix}{{m_{x_{i}}^{2}\left( {1 - \Delta_{A}} \right)}^{2} = {{b^{2}{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}} - {k_{x}^{2}\left( {1 - \Delta_{A}} \right)}^{2} - {k_{y}^{2}\left( {1 + \Delta_{A}} \right)}^{2} +}} \\{{2m_{x_{i}}{k_{x}\left( {1 + \Delta_{A}} \right)}^{2}} + {2m_{y_{i}}{k_{y}\left( {1 + \Delta_{A}} \right)}^{2}} - {m_{y_{i}}^{2}\left( {1 + \Delta_{A}} \right)}^{2}}\end{bmatrix}\end{matrix} & (32)\end{matrix}$ $\begin{matrix}\begin{matrix}{m_{x_{i}}^{2} =} \\\begin{bmatrix}{{m_{x_{i}}^{2}\left( {1 - \Delta_{A}} \right)}^{2} = {{b^{2}{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}} - {k_{x}^{2}\left( {1 - \Delta_{A}} \right)}^{2} - {k_{y}^{2}\left( {1 + \Delta_{A}} \right)}^{2} +}} \\{{2m_{y_{i}}k_{y}\frac{\left( {1 + \Delta_{A}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}} - {m_{y_{i}}^{2}\frac{\left( {1 + \Delta_{A}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}{k_{x}\left( {1 - \Delta_{A}} \right)}^{2}} + {2m_{i}{k_{y}\left( {1 + \Delta_{A}} \right)}^{2}} - {m_{y_{i}}^{2}\left( {1 + \Delta_{A}} \right)}^{2}}\end{bmatrix}\end{matrix} & (33)\end{matrix}$ $\begin{matrix}{\gamma = \frac{1 + \Delta_{A}}{1 - \Delta_{A}}} & (34)\end{matrix}$

As illustrated by Equation 34, the sensitivity mismatch coefficient γ isequal to the ratio of the sensitivity of sensing element 202A and thesensitivity of the sensing element 202B (and/or the ratio of thesensitivities of channels 201A-B). The term Δ_(A) (which is also foundin Model 3) represents the difference in sensitivity between sensingelements 202A-B or channels 201A-B.

$\begin{matrix}{m_{x_{i}}^{2} = {{b^{2}A_{0}^{2}\frac{\left( {1 - \Delta_{A}^{2}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}} - \left( {k_{x}^{2} + {k_{y}^{2}\gamma^{2}}} \right) + {2m_{x_{i}}k_{x}} + {2m_{y_{i}}k_{y}\gamma^{2}} - {m_{y_{i}}^{2}\gamma^{2}}}} & (35)\end{matrix}$ $\begin{matrix}{m_{x_{i}}^{2} = {\begin{matrix}\left\lbrack 1\  \right. & {2m_{x_{i}}} & {2m_{y_{i}}} & \left. {- m_{y_{i}}^{2}} \right\rbrack\end{matrix}\begin{bmatrix}{{b^{2}A_{o}^{2}\frac{\left( {1 - \Delta_{A^{2}}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}} - \left( {k_{x}^{2} + {k_{y}^{2}\gamma^{2}}} \right)} \\k_{x} \\{k_{y}\gamma^{2}} \\\gamma^{2}\end{bmatrix}}} & (36)\end{matrix}$

Using N sampled values m of signals 203A-B, equation 36 may bere-written as follows:

$\begin{matrix}{\begin{bmatrix}m_{x_{1}}^{2} \\m_{x_{2}}^{2} \\m_{x_{3}}^{2} \\ \vdots \\m_{x_{N}}^{2}\end{bmatrix} = {\begin{bmatrix}1 & {2m_{x_{1}}} & {2m_{y_{1}}} & {- m_{y_{1}}^{2}} \\1 & {2m_{x_{2}}} & {2m_{y_{2}}} & {- m_{y_{2}}^{2}} \\1 & {2m_{x_{3}}} & {2m_{y_{3}}} & {- m_{y_{3}}^{2}} \\ \vdots & \vdots & \vdots & \vdots \\1 & {2m_{x_{N}}} & {2m_{y_{N}}} & {- m_{y_{N}}^{2}}\end{bmatrix}\begin{bmatrix}{{b^{2}A_{0}^{2}\frac{\left( {1 - \Delta_{A^{2}}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}} - \left( {k_{x}^{2} + {k_{y}^{2}\gamma^{2}}} \right)} \\k_{x} \\{k_{y}\gamma^{2}} \\\gamma^{2}\end{bmatrix}}} & (37)\end{matrix}$

In some implementations, step 708 of the process 700A may be performedby solving equation 37 to obtain the values of the (i) the offsetadjustment vector k, and (ii) the sensitivity mismatch coefficient γ. Asnoted above, each of the sampled values m in equation 37 is the same orsimilar to the sampled values m of signals 202A-B that are discussedabove with respect to FIG. 3E. Each of the sampled values m may beobtained by sampling the signals 203A-B. Equation 37 can be solved by aleast-squares fitting to obtain the vector k and sensitivity mismatchcoefficient γ. As indicated above by equation 24, the vector k may beused to derive the offset vector o. As can be appreciated, the matriximmediately following the equality sign in equation 37 is anotherexample of the matrix M (shown in FIG. 3F). In some respects, b²A₀ maybe equal to the square norm of the magnetic field multiplied by the gainof the amplifier 204A-B.

Equation 37 can be re-written as follows:A ₀√{square root over (1−Δ_(A) ²)}b _(i)=Γ(m _(i)=k)   (38)where

$\begin{matrix}{\Gamma = \begin{bmatrix}{1/\sqrt{\gamma}} & 0 \\0 & \sqrt{\gamma}\end{bmatrix}} & (39)\end{matrix}$

Setting Δ_(A)=0 would result in γ=1, and it would effectively reduceModel 2 to Model 1.

MODEL 3

Model 3 is a more generalized version of Model 2. Model 3 can be used tocalculate the offset adjustment vector k, the sensitivity mismatchcoefficient γ, and a non-orthogonality coefficient s. Thenon-orthogonality coefficient s is used to adjust the signals 103Aand/or 103B to compensate for non-orthogonality between the axes ofmaximum sensitivity of sensing elements 202A-B.

The offset adjustment vector k includes elements k_(x) and k_(y).Element k_(x) is based on element o_(x) of an offset adjustment vectoro, which can be used to adjust the offset of signal 203A. Element k_(y)is based on element o_(y) of an offset adjustment vector o, which can beused to adjust the offset of signal 203B. The offset adjustment vector ois related to the offset adjustment vector k by equation 4 below. Asused throughout the disclosure, the term offset adjustment vector mayrefer to either one offset adjustment vector o or the offset adjustmentvector k.

Model 3 is presented in the context of a target magnetic field at sampletime i: b_(i)=[b_(x) _(i) b_(y) _(i) ]^(T). The magnitude of themagnetic field b is b²=||b_(i)||². The target magnetic field b_(i) isthe true value of the magnetic field that is generated by the target120. The target magnetic field b_(i) is constant over time (e.g., whenthe target 120 is a permanent magnet, etc.). The output of the sensingelements 202A-B at time i is, m_(i)=[m_(x) _(i) m_(y) _(i) ]^(T), wherem_(i). Is the same or similar to any of the sampled values m discussedabove with respect to FIG. 3F. Each value m_(i) is also referred to assensed magnetic field m_(i). As is discussed further below, solvingModel 3 based on a set of sampled values of signals 203A-B may yield theoffset adjustment vector, the sensitivity mismatch coefficients, and thenon-orthogonality coefficient. These coefficients can be used to derive(or better approximate) the value of the target magnetic field b_(i)from the measured magnetic field m_(i), in accordance with therelationships that are described below by equations 21-24.

Model 3 is based on the following terms:

-   -   Target magnetic field at sample time i: b_(i)=[b_(x) _(i) b_(y)        _(i) ]^(T)    -   Sensed field at sample time i: m_(i)=[m_(x) _(i) m_(y) _(i)        ]^(T)    -   Stray field: ƒ=[ƒ_(x)ƒ_(y)]^(T) (considered to be constant over        time)    -   Offset: o=[o_(x)o^(y)]^(T) (considered to be constant over time)    -   Non-orthogonality matrix:

$R = \begin{bmatrix}1 & 0 \\{{- s}{in}(\theta)} & {\cos(\theta)}\end{bmatrix}$(considered to be constant over time)

-   -   Sensitivity matrix:

$S = {S_{o}\begin{bmatrix}{1 + \Delta_{s}} & 0 \\0 & {1 - \Delta_{s}}\end{bmatrix}}$(considered to be constant over time)

-   -   Electrical gain matrix:

$G = {G_{o}\begin{bmatrix}{1 + \Delta_{G}} & 0 \\0 & {1 - \Delta_{G}}\end{bmatrix}}$(considered to be constant over time)

The sensed field m may be modeled by Equation 40 below:m _(i)=G(SR(b ₁+ƒ)+o)   (40)

Let:m _(i)=Ab _(i)+k   (41)where

$\begin{matrix}{{A = {{GSR} = {{{A_{0}\begin{bmatrix}{1 + \Delta_{A}} & 0 \\0 & {1 - \Delta_{A}}\end{bmatrix}}\begin{bmatrix}1 & 0 \\{{- s}{in}(\theta)} & {\cos(\theta)}\end{bmatrix}} = {A_{0}\begin{bmatrix}\left( {1 + \Delta_{A}} \right) & 0 \\{{- \left( {1 - \Delta_{A}} \right)}s} & {\left( {1 - \Delta_{A}} \right)c}\end{bmatrix}}}}},} & (42)\end{matrix}$s=sin(θ) , then it is constant over time   (43)c=cos(θ) , then it is constant over time   (44)A ₀=G ₀S₀(1+Δ_(G)Δ_(S)) , then it is constant over time   (45)

${\Delta_{A} = \frac{\Delta_{G} + \Delta_{s}}{1 + {\Delta_{G}\Delta_{s}}}},$then it is constant over time   (46)

${k = {{{GSRf} + {Go}} = \begin{bmatrix}k_{x} \\k_{y}\end{bmatrix}}},$then it is constant over time   (47)

$\begin{matrix}{A^{- 1} = {\frac{1}{{A_{0}\left( {1 - \Delta_{A}^{2}} \right)}c}\begin{bmatrix}{\left( {1 - \Delta_{A}} \right)c} & 0 \\{\left( {1 - \Delta_{A}} \right)s} & \left( {1 + \Delta_{A}} \right)\end{bmatrix}}} & (48)\end{matrix}$ $\begin{matrix}{\left( A^{- 1} \right)^{T} = {\frac{1}{{A_{0}\left( {1 - \Delta_{A}^{2}} \right)}c}\begin{bmatrix}{\left( {1 - \Delta_{A}} \right)c} & \left( {1 -} \right. & {\left. \Delta_{A} \right)s} \\0 & \left( {1 +} \right. & \left. \Delta_{A} \right)\end{bmatrix}}} & (49)\end{matrix}$ $\begin{matrix}{{\left( A^{- 1} \right)^{T}A^{- 1}} = {\frac{1}{{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}c^{2}}\begin{bmatrix}\left( {1 - \Delta_{A}} \right)^{2} & {\left( {1 - \Delta_{A}^{2}} \right)s} \\{\left( {1 - \Delta_{A}^{2}} \right)s} & \left( {1 + \Delta_{A}} \right)^{2}\end{bmatrix}}} & (50)\end{matrix}$ $\begin{matrix}{b_{i} = {A^{- 1}\left( {m_{i} - k} \right)}} & (51)\end{matrix}$ $\begin{matrix}\begin{matrix}{b^{2} = {{b_{i}} = {{b_{i}^{T}b_{i}} = {\left( {m_{i} - k} \right)^{T}\left( A^{- 1} \right)^{T}{A^{- 1}\left( {m_{i} - k} \right)}}}}} \\{= {\begin{matrix}\left\lbrack {m_{x_{i}} - k_{x}} \right. & \left. {m_{y_{i}} - k_{y}} \right\rbrack\end{matrix}{{\frac{1}{{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}c^{2}}\begin{bmatrix}\left( {1 - \Delta_{A}} \right)^{2} & \left( {1 - \Delta_{A}} \right)^{2} \\\left( {1 - \Delta_{A}} \right)^{2} & \left( {1 - \Delta_{A}} \right)^{2}\end{bmatrix}}\begin{bmatrix}{m_{x_{i}} - k_{x}} \\{m_{y_{i}} - k_{y}}\end{bmatrix}}}} \\{= {\frac{1}{{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}c^{2}}\left\lbrack {{\left( {m_{x_{i}} - k_{x}} \right)\left( {1 - \Delta_{A}} \right)^{2}} + {\left( {m_{y_{i}} - k_{y}} \right)\left( {1 - \Delta_{A}^{2}} \right){s\left( {m_{x_{i}} - k_{x}} \right)}\left( {1 - \Delta_{A}^{2}} \right)s} +} \right.}} \\{\left. {}{\left( {m_{y_{i}} - k_{y}} \right)\left( {1 + \Delta_{A}} \right)^{2}} \right\rbrack\begin{bmatrix}{m_{x_{i}} - k_{x}} \\{m_{y_{i}} - k_{y}}\end{bmatrix}} \\{= {\frac{1}{{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}c^{2}}\left\lbrack {{\left( {m_{x_{i}} - k_{x}} \right)^{2}\left( {1 - \Delta_{A}} \right)^{2}} +} \right.}} \\\left. {}{{2\left( {m_{x_{i}} - k_{x}} \right)\left( {m_{y_{i}} - k_{y}} \right)\left( {1 - \Delta_{A}^{2}} \right)s} + {\left( {m_{y_{i}} - k_{y}} \right)^{2}\left( {1 + \Delta_{A}} \right)^{2}}} \right\rbrack \\{= {\frac{1}{{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}c^{2}}\begin{bmatrix}{{m_{x_{i}}^{2}\left( {1 - \Delta_{A}} \right)}^{2} + {k_{x}^{2}\left( {1 - \Delta_{A}} \right)}^{2} - {2m_{x_{i}}{k_{x}\left( {1 - \Delta_{A}} \right)}^{2}}} \\\begin{matrix}{{2m_{x_{i}}m_{y_{i}}\left( {1 - \Delta_{A}^{2}} \right)s} - {2m_{x_{i}}k_{y}\left( {1 - \Delta_{A}^{2}} \right)s} -} \\{{2k_{x}m_{y_{i}}\left( {1 - \Delta_{A}^{2}} \right)s} + {2k_{x}{k_{y}\left( {1 - \Delta_{A}^{2}} \right)}s}}\end{matrix} \\{{m_{y_{i}}^{2}\left( {1 + \Delta_{A}} \right)}^{2} + {k_{y}^{2}\left( {1 + \Delta_{A}} \right)}^{2} - {2m_{y_{i}}{k_{y}\left( {1 + \Delta_{A}} \right)}^{2}}}\end{bmatrix}}}\end{matrix} & (52)\end{matrix}$ $\begin{matrix}{{b^{2}A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)^{2}c^{2}} = \begin{matrix}{{m_{x_{i}}^{2}\left( {1 - \Delta_{A}} \right)}^{2} + {k_{x}^{2}\left( {1 - \Delta_{A}} \right)}^{2} - {2m_{x_{i}}{k_{x}\left( {1 - \Delta_{A}} \right)}^{2}}} \\{{2m_{x_{i}}m_{y_{i}}\left( {1 - \Delta_{A}^{2}} \right)s} - {2m_{x_{i}}{k_{y}\left( {1 - \Delta_{A}^{2}} \right)}s} - {2k_{x}{m_{y_{i}}\left( {1 - \Delta_{A}^{2}} \right)}s} + {2k_{x}{k_{y}\left( {1 - \Delta_{A}^{2}} \right)}s}} \\{{m_{y_{i}}^{2}\left( {1 + \Delta_{A}} \right)}^{2} + {k_{y}^{2}\left( {1 + \Delta_{A}} \right)}^{2} - {2m_{y_{i}}{k_{y}\left( {1 + \Delta_{A}} \right)}^{2}}}\end{matrix}} & (53)\end{matrix}$ $\begin{matrix}\begin{matrix}{{b^{2}{A_{0}^{2}\left( {1 - \Delta_{A}^{2}} \right)}^{2}c^{2}} = {{m_{x_{i}}^{2}\left( {1 - \Delta_{A}} \right)}^{2} + {m_{y_{i}}^{2}\left( {1 + \Delta_{A}} \right)}^{2} + {k_{x}^{2}\left( {1 - \Delta_{A}} \right)}^{2} + {k_{y}^{2}\left( {1 + \Delta_{A}} \right)}^{2}}} \\{{{+ 2}k_{x}{k_{y}\left( {1 - \Delta_{A}^{2}} \right)}s} - {2{m_{x_{i}}\left\lbrack {{k_{x}\left( {1 - \Delta_{A}} \right)}^{2} + {{k_{y}\left( {1 - \Delta_{A}^{2}} \right)}s}} \right\rbrack}}} \\{{{- 2}{m_{y_{i}}\left\lbrack {{{k_{x}\left( {1 - \Delta_{A}^{2}} \right)}s} + {k_{y}\left( {1 + \Delta_{A}} \right)}^{2}} \right\rbrack}} + {2m_{x_{i}}{m_{y_{i}}\left( {1 - \Delta_{A}^{2}} \right)}s}}\end{matrix} & (54)\end{matrix}$ $\begin{matrix}\begin{matrix}{{b^{2}A_{0}^{2}\frac{\left( {1 - \Delta_{A}^{2}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}c^{2}} = {m_{x_{i}}^{2} + {m_{y_{i}}^{2}\frac{\left( {1 + \Delta_{A}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}} + k_{x}^{2} + {k_{y}^{2}\frac{\left( {1 + \Delta_{A}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}} + {2k_{x}k_{y}\frac{\left( {1 - \Delta_{A}^{2}} \right)}{\left( {1 - \Delta_{A}} \right)^{2}}s}}} \\{{{- 2}{m_{x_{i}}\left\lbrack {k_{x} + {k_{y}\frac{\left( {1 - \Delta_{A}^{2}} \right)}{\left( {1 - \Delta_{A}} \right)^{2}}s}} \right\rbrack}} - {2{m_{y_{i}}\left\lbrack {{k_{x}\frac{\left( {1 - \Delta_{A}^{2}} \right)}{\left( {1 - \Delta_{A}} \right)^{2}}s} + {k_{y}\frac{\left( {1 + \Delta_{A}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}}} \right\rbrack}}} \\{{+ 2}m_{x_{i}}m_{y_{i}}\frac{\left( {1 - \Delta_{A}^{2}} \right)}{\left( {1 - \Delta_{A}} \right)^{2}}s}\end{matrix} & (55)\end{matrix}$ $\begin{matrix}{\gamma = \frac{1 + \Delta_{A}}{1 - \Delta_{A}}} & (56)\end{matrix}$ $\begin{matrix}{{b^{2}A_{0}^{2}\frac{\left( {1 - \Delta_{A}^{2}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}c^{2}} = {m_{x_{i}}^{2} + {m_{y_{i}}^{2}\gamma^{2}} + k_{x}^{2} + {k_{y}^{2}\gamma^{2}} + {2k_{x}k_{y}\gamma s} - {2{m_{x_{i}}\left( {k_{x} + {k_{y}\gamma s}} \right)}} - {2{m_{y_{i}}\left\lbrack {{k_{x}\gamma s} + {k_{y}\gamma^{2}}} \right\rbrack}} + {2m_{x_{i}}m_{y_{i}}\gamma s}}} & (57)\end{matrix}$ $\begin{matrix}{m_{x_{i}}^{2} = {{b^{2}A_{0}^{2}\frac{\left( {1 - \Delta_{A^{2}}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}c^{2}} - \left( {k_{x}^{2} + {k_{y}^{2}\gamma^{2}}} \right) - {2k_{x}k_{y}\gamma s} + {2{m_{x_{i}}\left( {k_{x} + {k_{y}\gamma s}} \right)}} + {2{m_{y_{i}}\left\lbrack {{k_{x}\gamma s} + {k_{y}\gamma^{2}}} \right\rbrack}} - {m_{y_{i}}^{2}\gamma^{2}} - {2m_{x_{i}}m_{y_{i}}\gamma s}}} & (58)\end{matrix}$ $\begin{matrix}{m_{x_{i}}^{2} = {\begin{bmatrix}1 & {2m_{x_{i}}} & {2m_{y_{i}}} & {- m_{y_{i}}^{2}} & {{- 2}m_{x_{i}}m_{y_{i}}}\end{bmatrix}{\begin{bmatrix}{{b^{2}A_{0}^{2}\frac{\left( {1 - \Delta_{A}^{2}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}c^{2}} - \left( {k_{x}^{2} + {k_{y}^{2}\gamma^{2}}} \right) - {2k_{x}k_{y}\gamma s}} \\{k_{x} + {k_{y}\gamma s}} \\{{k_{x}\gamma s} + {k_{y}\gamma^{2}}} \\\gamma^{2} \\{\gamma s}\end{bmatrix}}}} & (59)\end{matrix}$

Using N samples m of signals 203A-B, equation 59 may be re-written asfollows:

$\begin{matrix}{\begin{bmatrix}m_{x_{1}}^{2} \\m_{x_{2}}^{2} \\m_{x_{3}}^{2} \\m_{x_{N}}^{2}\end{bmatrix} = {\begin{bmatrix}1 & {2m_{x_{1}}} & {2m_{y_{1}}} & {- m_{y_{1}}^{2}} & {{- 2}m_{x_{1}}m_{y_{1}}} \\1 & {2m_{x_{2}}} & {2m_{y_{2}}} & {- m_{y_{2}}^{2}} & {{- 2}m_{x_{2}}m_{y_{2}}} \\1 & {2m_{x_{3}}} & {2m_{y_{3}}} & {- m_{y_{3}}^{2}} & {{- 2}m_{x_{3}}m_{y_{3}}} \\ \vdots & \vdots & \vdots & \vdots & \vdots \\1 & {2m_{x_{N}}} & {2m_{y_{N}}} & {- m_{y_{N}}^{2}} & {{- 2}m_{x_{N}}m_{y_{N}}}\end{bmatrix}{\begin{bmatrix}{{b^{2}A_{0}^{2}\frac{\left( {1 - \Delta_{A}^{2}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}c^{2}} - \left( {k_{x}^{2} + {k_{y}^{2}\gamma^{2}}} \right) - {2k_{x}k_{y}\gamma s}} \\{k_{x} + {k_{y}\gamma s}} \\{{k_{x}\gamma s} + {k_{y}\gamma^{2}}} \\\gamma^{2} \\{\gamma s}\end{bmatrix}}}} & (60)\end{matrix}$

In some implementations, step 708 of the process 700A may be performedby solving equation 60 to obtain the values of the (i) the offsetadjustment vector k, (ii) the sensitivity mismatch coefficient γ, and(iii) the non-orthogonality coefficient s. As noted above, each of thesampled values m in equation 60 is the same or similar to the sampledvalues m of signals 202A-B that are discussed above with respect to FIG.3E. Each of the sampled values m may be obtained by sampling the signals203A-B. Equation 60 can be solved by a least-squares fitting to obtainthe values of the vector k, and sensitivity mismatch coefficient γ. Asindicated above by equation 24, the vector k may be used to derive theoffset vector o. Furthermore, solving equation F may yield thenon-orthogonality coefficient s=sin (θ) or c=cos (θ), where θ isorthogonality error of sensors 202A-B (i.e., the deviation from 90degrees of the angle between the axes of maximum sensitivity of sensingelements 202A-B). As can be appreciated, the matrix immediatelyfollowing the equality sign in equation 60 is another example of thematrix M (shown in FIG. 3F). In some respects, b²A₀ may be equal to thesquare norm of the magnetic field multiplied by the gain of theamplifier 204A-B.

Let:v _(x)=k _(x)+k _(y)γs   (61)v _(y)=k _(x)γs+k _(y)γ²  (62)

Then, from equations 61 and 62, it follows:

$\begin{matrix}{k_{x} = \frac{{v_{x}\gamma} - {v_{y}s}}{\gamma\left( {1 - s^{2}} \right)}} & (63)\end{matrix}$ $\begin{matrix}{k_{y} = \frac{v_{y} - {v_{x}\gamma s}}{\gamma^{2}\left( {1 - s^{2}} \right)}} & (64)\end{matrix}$

Then, from equations 63 and 64, it follows:A ₀cos(θ)b _(i)=ΘΓ(m _(i)−k)   (64)

Where:

$\begin{matrix}{\Gamma = \begin{bmatrix}{1/\sqrt{\gamma}} & 0 \\0 & \sqrt{\gamma}\end{bmatrix}} & (65)\end{matrix}$ $\begin{matrix}{\Theta = \begin{bmatrix}{\cos(\theta)} & 0 \\{\sin(\theta)} & 1\end{bmatrix}} & (66)\end{matrix}$

In some respects, setting θ=0 would yield s=sin(theta)=0, and it wouldeffectively reduce Model 3 to Model 2.

The concepts and ideas described herein may be implemented, at least inpart, via a computer program product, (e.g., in a non-transitorymachine-readable storage medium such as, for example, a non-transitorycomputer-readable medium), for execution by, or to control the operationof, data processing apparatus (e.g., a programmable processor, acomputer, or multiple computers). Each such program may be implementedin a high-level procedural or object-oriented programming language towork with the rest of the computer-based system. However, the programsmay be implemented in assembly, machine language, or HardwareDescription Language. The language may be a compiled or an interpretedlanguage, and it may be deployed in any form, including as a stand-aloneprogram or as a module, component, subroutine, or another unit suitablefor use in a computing environment. A computer program may be deployedto be executed on one computer or multiple computers at one site ordistributed across multiple sites and interconnected by a communicationnetwork. A computer program may be stored on a non-transitorymachine-readable medium that is readable by a general or special purposeprogrammable computer for configuring and operating the computer whenthe non-transitory machine-readable medium is read by the computer toperform the processes described herein. For example, the processesdescribed herein may also be implemented as a non-transitorymachine-readable storage medium, configured with a computer program,where upon execution, instructions in the computer program cause thecomputer to operate in accordance with the processes. A non-transitorymachine-readable medium may include but is not limited to a hard drive,compact disc, flash memory, non-volatile memory, or volatile memory. Theterm unit (e.g., a addition unit, a multiplication unit, etc.), as usedthroughout the disclosure may refer to hardware (e.g., an electroniccircuit) that is configured to perform a function (e.g., addition ormultiplication, etc.), software that is executed by at least oneprocessor, and configured to perform the function, or a combination ofhardware and software.

According to the present disclosure, a magnetic field sensing elementcan include one or more magnetic field sensing elements, such as Halleffect elements, magnetoresistance elements, or magnetoresistors, andcan include one or more such elements of the same or different types. Asis known, there are different types of Hall effect elements, forexample, a planar Hall element, a vertical Hall element, and a CircularVertical Hall (CVH) element. As is also known, there are different typesof magnetoresistance elements, for example, a semiconductormagnetoresistance element such as Indium Antimonide (InSb), a giantmagnetoresistance (GMR) element, for example, a spin valve, ananisotropic magnetoresistance element (AMR), a tunnelingmagnetoresistance (TMR) element, and a magnetic tunnel junction (MTJ).The magnetic field sensing element may be a single element or,alternatively, may include two or more magnetic field sensing elementsarranged in various configurations, e.g., a half bridge or full(Wheatstone) bridge.*. Depending on the device type and otherapplication requirements, the magnetic field sensing element may be adevice made of a type IV semiconductor material such as Silicon (Si) orGermanium (Ge), or a type III-V semiconductor material likeGallium-Arsenide (GaAs) or an Indium compound, e.g., Indium-Antimonide(InSb).

Having described preferred embodiments, which serve to illustratevarious concepts, structures and techniques, which are the subject ofthis patent, it will now become apparent that other embodimentsincorporating these concepts, structures and techniques may be used.Accordingly, it is submitted that the scope of the patent should not belimited to the described embodiments but rather should be limited onlyby the spirit and scope of the following claims.

The invention claimed is:
 1. A method for use in a sensor, the methodcomprising: obtaining at least three sampled values m, each of thesampled values m including a respective first component that is obtainedbased on a first signal and a respective second component that isobtained based on a second signal, the first signal being generated by afirst magnetic field sensing element of the sensor in response to amagnetic field that is associated with a rotating target and the secondsignal being generated by a second magnetic field sensing element of thesensor in response to the magnetic field that is associated with therotating target, each of the at least three sampled values beingassociated with a different respective angular position of the rotatingtarget; generating a plurality of number arrays based on the at leastthree sampled values m, each of the number arrays corresponding to adifferent respective sampled value m, each of the number arrays beingbased on a scaled or non-scaled value of the first component of thearray's corresponding sampled value m and a scaled or non-scaled valueof the second component of the array's corresponding sampled value m;solving a system of equations to yield at least one of (i) an offsetadjustment vector k, (ii) a sensitivity mismatch coefficient γ, and(iii) a non-orthogonality coefficient s, the system of equations beingarranged to model each of the sampled values m as a function of: therespective one of the plurality of number arrays that is generated basedon the sampled value m, the magnetic field that is associated with therotating target, and the at least one of (i) the offset adjustmentvector k, (ii) the sensitivity mismatch coefficient γ, and (iii) thenon-orthogonality coefficient s; storing the at least one of (i) theoffset adjustment vector k, (ii) the sensitivity mismatch coefficient γ,and (iii) the non-orthogonality coefficient s in a memory of the sensor;adjusting, by a processing circuitry of the sensor, at least one of thefirst signal and the second signal based on at least one of (i) theoffset adjustment vector k, (ii) the sensitivity mismatch coefficient γ,and (iii) the non-orthogonality coefficient s; and using, by theprocessing circuitry of the sensor, the first signal and the secondsignal to detect an angular position of the rotating target.
 2. Themethod of claim 1, wherein at least three sampled values are obtained,and the system of equations has the form: $\begin{bmatrix}m_{x_{1}}^{2} \\m_{x_{2}}^{2} \\m_{x_{3}}^{2} \\m_{x_{4}}^{2}\end{bmatrix} = {\begin{bmatrix}1 & {2m_{x_{1}}} & {2m_{y_{1}}} & {- m_{y_{1}}^{2}} \\1 & {2m_{x_{2}}} & {2m_{y_{2}}} & {- m_{y_{2}}^{2}} \\1 & {2m_{x_{3}}} & {2m_{y_{3}}} & {- m_{y_{3}}^{2}} \\1 & {2m_{x_{4}}} & {2m_{y_{4}}} & {- m_{y_{4}}^{2}}\end{bmatrix}\begin{bmatrix}{{b^{2}A_{0}^{2}\frac{\left( {1 - \Delta_{A}^{2}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}} - \left( {k_{x}^{2} + {k_{y}^{2}\gamma^{2}}} \right)} \\k_{x} \\{k_{x}\gamma s} \\\gamma^{2}\end{bmatrix}}$ where m_(x) _(q) and m_(y) _(q) are the respective firstand second components of sample value m_(q), N>q≥1, A₀ is a sensitivityand gain product, N is a positive integer, b is the magnetic field thatis associated with the rotating target, k_(x) is a first component ofthe offset adjustment vector k, and k_(y) is a second component of theoffset adjustment vector k.
 3. The method of claim 1, wherein each ofthe plurality of number arrays represents a different row in a matrix M,the matrix M having the form: $M = \begin{bmatrix}1 & {2m_{x_{1}}} & {2m_{y_{1}}} \\1 & {2m_{x_{2}}} & {2m_{y_{2}}} \\1 & {2m_{x_{3}}} & {2m_{y_{3}}} \\ \vdots & \vdots & \vdots \\1 & {2m_{x_{N}}} & {2m_{y_{N}}}\end{bmatrix}$ where m_(x) _(q) and m_(y) _(q) are the respective firstand second components of sample value m_(q), N>q≥1, and N is a positiveinteger.
 4. The method of claim 1, wherein the first magnetic fieldsensing element includes at least one of a Hall element, a giantmagnetoresistor (GMR), or a tunnel magnetoresistor (TMR), and the secondmagnetic field sensing element includes at least one of a Hall element,a giant magnetoresistor (GMR), or a tunnel magnetoresistor (TMR).
 5. Themethod of claim 1, wherein each of the sampled values m includes one ofan individual sampled vector of the first and second signals or anaverage of a plurality of sampled vectors, each of the plurality ofsampled vectors being associated with a same position of the rotatingtarget.
 6. The method of claim 1, wherein the system of equations hasthe form: $\begin{bmatrix}m_{x_{1}}^{2} \\m_{x_{2}}^{2} \\m_{x_{3}}^{2} \\ \vdots \\m_{x_{N}}^{2}\end{bmatrix} = {\begin{bmatrix}1 & {2m_{x_{1}}} & {2m_{y_{1}}} & {- m_{y_{1}}^{2}} & {{- 2}m_{x_{1}}m_{y_{1}}} \\1 & {2m_{x_{2}}} & {2m_{y_{2}}} & {- m_{y_{2}}^{2}} & {{- 2}m_{x_{2}}m_{y_{2}}} \\1 & {2m_{x_{3}}} & {2m_{y_{3}}} & {- m_{y_{3}}^{2}} & {{- 2}m_{x_{3}}m_{y_{3}}} \\ \vdots & \vdots & \vdots & \vdots & \vdots \\1 & {2m_{x_{N}}} & {2m_{y_{N}}} & {- m_{y_{N}}^{2}} & {{- 2}m_{x_{N}}m_{y_{N}}}\end{bmatrix}{\left\lbrack \text{⁠}\begin{matrix}{{b^{2}A_{0}^{2}\frac{\left( {1 - \Delta_{A}^{2}} \right)^{2}}{\left( {1 - \Delta_{A}} \right)^{2}}c^{2}} - \left( {k_{x}^{2} + {k_{y}^{2}\gamma^{2}}} \right) - {2k_{x}k_{y}\gamma s}} \\{k_{x} + {k_{y}\gamma s}} \\{{k_{x}\gamma s} + {k_{y}\gamma^{2}}} \\\gamma^{2} \\{\gamma s}\end{matrix} \right\rbrack}}$ where m_(x) _(q) and m_(y) _(q) are therespective first and second components of sample value m_(q), N>q≥1, Nis a positive integer, b is the magnetic field that is associated withthe rotating target, k is the offset adjustment vector, k_(x) is a firstcomponent of the offset adjustment vector k, and k_(y) is a secondcomponent of the offset adjustment vector k.
 7. The method of claim 1,wherein at least three sampled values are obtained, and the system ofequations has the form: $\begin{bmatrix}{m_{1}}^{2} \\{m_{2}}^{2} \\{m_{3}}^{2}\end{bmatrix} = {\begin{bmatrix}1 & {2m_{x_{1}}} & {2m_{y_{1}}} \\1 & {2m_{x_{2}}} & {2m_{y_{2}}} \\1 & {2m_{x_{3}}} & {2m_{y_{3}}}\end{bmatrix}\begin{bmatrix}{{A_{0}^{2}{b}^{2}} - {k}^{2} + {2\sigma_{n}^{2}}} \\k_{x} \\k_{y}\end{bmatrix}}$ where m_(x) _(q) and m_(y) _(q) are the respective firstand second components of sample value m_(q), N>q≥1, N is a positiveinteger, b is the magnetic field that is associated with the rotatingtarget, k is the offset adjustment vector, k_(x) is a first component ofthe offset adjustment vector k, k_(y) is a second component of theoffset adjustment vector k, and σ_(n) is noise variance.
 8. The methodof claim 1, wherein at least three sampled values are obtained, and thesystem of equations has the form: $\begin{bmatrix}{m_{1}}^{2} \\{m_{2}}^{2} \\{m_{3}}^{2}\end{bmatrix} = {\begin{bmatrix}1 & {2m_{x_{1}}} & {2m_{y_{1}}} \\1 & {2m_{x_{2}}} & {2m_{y_{2}}} \\1 & {2m_{x_{3}}} & {2m_{y_{3}}}\end{bmatrix}\begin{bmatrix}{{A_{0}^{2}{b}^{2}} - {k}^{2}} \\k_{x} \\k_{y}\end{bmatrix}}$ where m_(x) _(q) and m_(y) _(q) are the respective firstand second components of sample value m_(q), N>q≥1, N is a positiveinteger, b is the magnetic field that is associated with the rotatingtarget, k_(x) is a first component of the offset adjustment vector k,and k_(y) is a second component of the offset adjustment vector k. 9.The method of claim 1, wherein: at least four sampled values m areobtained, the system of equations is further arranged to model each ofthe sampled values m as a function of the sensitivity mismatchcoefficient and the non-orthogonality coefficient, and solving thesystem of equations yields the sensitivity mismatch coefficient and thenon-orthogonality coefficient.
 10. The method of claim 9, wherein thesystem of equations has the form: $\begin{bmatrix}{m_{1}}^{2} \\{m_{2}}^{2} \\\begin{matrix}{m_{3}}^{2} \\{m_{4}}^{2}\end{matrix}\end{bmatrix} = {\begin{bmatrix}1 & {2m_{x_{1}}} & {2m_{y_{1}}} & {{- 2}m_{x_{1}}m_{y_{1}}} \\1 & {2m_{x_{2}}} & {2m_{y_{2}}} & {{- 2}m_{x_{2}}m_{y_{2}}} \\1 & {2m_{x_{3}}} & {2m_{y_{3}}} & {{- 2}m_{x_{3}}m_{y_{3}}} \\1 & {2m_{4}} & {2m_{y_{4}}} & {{- 2}m_{x_{4}}m_{4}}\end{bmatrix}\begin{bmatrix}{{b^{2}A_{0}^{2}c^{2}} - \left( {k_{x}^{2} + k_{y}^{2}} \right) - {2k_{x}k_{y}s}} \\\begin{matrix}{k_{x} + {k_{y}s}} \\{{k_{x}s} + k_{y}}\end{matrix} \\s\end{bmatrix}}$ where m_(x) _(q) and m_(y) _(q) are the respective firstand second components of sample value m_(q), N>q≥1, N is a positiveinteger, b is the magnetic field that is associated with the rotatingtarget, k_(x) is a first component of the offset adjustment vector k,and k_(y) is a second component of the offset adjustment vector k.
 11. Asensor, comprising: a first magnetic field sensing element, the firstsensing element being arranged to generate a first signal in response toa magnetic field that is associated with a rotating target; a secondmagnetic field sensing element, the second sensing element beingarranged to generate a second signal in response to the magnetic fieldthat is associated with the rotating target; a memory; and a processingcircuitry operatively coupled to the memory, the first magnetic fieldsensing element and the second magnetic field sensing element, theprocessing circuitry being configured to: obtain at least three sampledvalues m, each of the sampled values m including a respective firstcomponent that is obtained based on the first signal and a respectivesecond component that is obtained based on the second signal, each ofthe at least three sample values being associated with a differentangular position of the rotating target; generate a plurality of numberarrays based on the at least three sampled values m, each of the numberarrays corresponding to a different respective sampled value m, each ofthe number arrays being based on a scaled or non-scaled value of thefirst component of the array's corresponding sampled value m and ascaled or non-scaled value of the second component of the array'scorresponding sampled value m; and solve a system of equations to yieldan offset adjustment vector k and, the system of equations beingarranged to model each of the sampled values m as a function of: therespective one of the plurality of number arrays that is generated basedon the sampled value m, the magnetic field that is associated with therotating target, and the offset adjustment vector k; and store theoffset adjustment vector k in the memory; adjust at least one of thefirst signal and the second signal based on the offset adjustmentvector; and use the first signal and the second signal to detect anangular position of the rotating target.
 12. The sensor of claim 11,wherein the first magnetic field sensing element includes at least oneof a Hall element, a giant magnetoresistor (GMR), or a tunnelmagnetoresistor (TMR), and the second magnetic field sensing elementincludes at least one of a Hall element, a giant magnetoresistor (GMR),or a tunnel magnetoresistor (TMR).
 13. The sensor of claim 11, whereineach of the sampled values m includes one of an individual sampledvector of the first and second signals or an average of a plurality ofsampled vectors, each of the plurality of sampled vectors beingassociated with a same position of the rotating target.
 14. The sensorof claim 11, wherein: the system of equations is further arranged tomodel each of the sampled values m as a function of a non-orthogonalitycoefficient that is associated with the first and second magnetic fieldsensing elements, solving the system of equations further yields thenon-orthogonality coefficient, and the processing circuitry is furtherconfigured to store the non-orthogonality coefficient in the memory. 15.The sensor of claim 11, wherein: at least four sampled values m areobtained, the system of equations is further arranged to model each ofthe sampled values m as a function of a sensitivity mismatch coefficientthat is associated with the first and second magnetic field sensingelements, solving the system of equations further yields the sensitivitymismatch coefficient, and the processing circuitry is further configuredto store the sensitivity mismatch coefficient in the memory.
 16. Thesensor of claim 11, wherein: at least five sampled values m areobtained, the system of equations is further arranged to model each ofthe sampled values m as a function of a sensitivity mismatch coefficientand a non-orthogonality coefficient, solving the system of equationsfurther yields the sensitivity mismatch coefficient and thenon-orthogonality coefficient, and the processing circuitry is furtherconfigured store the sensitivity mismatch coefficient and thenon-orthogonality coefficient in the memory.
 17. A system, comprising: aprocessing circuitry configured to: obtain at least three sampled valuesm, each of the sampled values m including a respective first componentthat is obtained based on a first signal and a respective secondcomponent that is obtained based on a second signal, the first signalbeing generated by a first magnetic field sensing element in response toa magnetic field that is associated with a rotating target and thesecond signal being generated by a second magnetic field sensing elementin response to the magnetic field that is associated with the rotatingtarget, each of the at least three sampled values being associated witha different respective angular position of the rotating target; generatea plurality of number arrays based on the at least three sampled valuesm, each of the number arrays corresponding to a different respectivesampled value m, each of the number arrays being based on a scaled ornon-scaled value of the first component of the array's correspondingsampled value m and a scaled or non-scaled value of the second componentof the array's corresponding sampled value m; solve a system ofequations to yield at least one of (i) an offset adjustment vector k,(ii) a sensitivity mismatch coefficient γ, and (iii) a non-orthogonalitycoefficient s, the system of equations being arranged to model each ofthe sampled values m as a function of: the respective one of theplurality of number arrays that is generated based on the sampled valuem, the magnetic field that is associated with the rotating target, andthe at least one of (i) the offset adjustment vector k, (ii) thesensitivity mismatch coefficient γ, and (iii) the non-orthogonalitycoefficient s; and store the at least one of (i) the offset adjustmentvector k, (ii) the sensitivity mismatch coefficient γ, and (iii) thenon-orthogonality coefficient s in a memory, and adjust at least one ofthe first signal and the second signal based on at least one of the (i)the offset adjustment vector k, (ii) the sensitivity mismatchcoefficient γ, and (iii) the non-orthogonality coefficient s; and usethe first signal and the second signal to detect an angular position ofthe rotating target.
 18. The system of claim 17, wherein the systemincludes a calibration system and the memory includes a non-volatilememory of a sensor, the sensor including the first and second magneticfield sensing elements.
 19. The system of claim 17, wherein the systemincludes a signal processing system that is configured to processsignals output from a sensor, the sensor including the first and secondmagnetic field sensing elements.
 20. A system comprising: means forobtaining at least three sampled values m, each of the sampled values mincluding a respective first component that is obtained based on a firstsignal and a respective second component that is obtained based on asecond signal, the first signal being generated by a first magneticfield sensing element in response to a magnetic field that is associatedwith a rotating target and the second signal being generated by a secondmagnetic field sensing element in response to the magnetic field that isassociated with the rotating target, each of the at least three sampledvalues being associated with a different respective angular position ofthe rotating target; means for generating a plurality of number arraysbased on the at least three sampled values m, each of the number arrayscorresponding to a different respective sampled value m, each of thenumber arrays being based on a scaled or non-scaled value of the firstcomponent of the array's corresponding sampled value m and a scaled ornon-scaled value of the second component of the array's correspondingsampled value m; means for solving a system of equations to yield atleast one of (i) an offset adjustment vector k, (ii) a sensitivitymismatch coefficient γ, and (iii) a non-orthogonality coefficient s, thesystem of equations being arranged to model each of the sampled values mas a function of: the respective one of the plurality of number arraysthat is generated based on the sampled value m, the magnetic field thatis associated with the rotating target, and the at least one of (i) theoffset adjustment vector k, (ii) the sensitivity mismatch coefficient γ,and (iii) the non-orthogonality coefficient s; and means for storing theat least one of (i) the offset adjustment vector k, (ii) the sensitivitymismatch coefficient γ, and (iii) the non-orthogonality coefficient s ina memory for use in adjusting at least one of the first signal and thesecond signal; and means for adjusting at least one of the first signaland the second signal based on at least one of (i) the offset adjustmentvector k, (ii) the sensitivity mismatch coefficient γ, and (iii) thenon-orthogonality coefficient s, wherein the first signal and the secondsignal are used to detect an angular position of the rotating target.21. A non-transitory computer readable medium storing one or moreprocessor-executable instructions, which, when executed by a processingcircuitry, cause the processing circuitry to execute a processcomprising the operations of: obtaining at least three sampled values m,each of the sampled values m including a respective first component thatis obtained based on a first signal and a respective second componentthat is obtained based on a second signal, the first signal beinggenerated by a first magnetic field sensing element in response to amagnetic field that is associated with a rotating target and the secondsignal being generated by a second magnetic field sensing element inresponse to the magnetic field that is associated with the rotatingtarget, each of the at least three sampled values being associated witha different respective angular position of the rotating target;generating a plurality of number arrays based on the at least threesampled values m, each of the number arrays corresponding to a differentrespective sampled value m, each of the number arrays being based on ascaled or non-scaled value of the first component of the array'scorresponding sampled value m and a scaled or non-scaled value of thesecond component of the array's corresponding sampled value m; solving asystem of equations to yield at least one of (i) an offset adjustmentvector k, (ii) a sensitivity mismatch coefficient γ, and (iii) anon-orthogonality coefficient s, the system of equations being arrangedto model each of the sampled values m as a function of: the respectiveone of the plurality of number arrays that is generated based on thesampled value m, the magnetic field that is associated with the rotatingtarget, and the at least one of (i) the offset adjustment vector k, (ii)the sensitivity mismatch coefficient γ, and (iii) the non-orthogonalitycoefficient s; and storing the at least one of (i) the offset adjustmentvector k, (ii) the sensitivity mismatch coefficient γ, and (iii) thenon-orthogonality coefficient s in a memory for use in adjusting atleast one of the first signal and the second signal; adjusting at leastone of the first signal and the second signal based on at least and of(i) the offset adjustment vector k, (ii) the sensitivity mismatchcoefficient γ, and (iii) the non-orthogonality coefficient s; and usingthe first signal and the second signal to detect an angular position ofthe rotating target.